/**
 * 
 */
package niuke;

import java.util.Scanner;

/**
 * @author zhongfang
 *
 */
public class 射击游戏 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[][] pos = new int[n][2];
		for (int i = 0; i < n; i++) {
			pos[i][0] = scanner.nextInt();
		}
		for (int i = 0; i < n; i++) {
			pos[i][1] = scanner.nextInt();
		}
		if (n < 4) {
			System.out.println(n);
		}
		int max = 3;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				double a = ((double) pos[i][1] - pos[j][1]) / (pos[i][0] - pos[j][0]);
				double b = pos[i][1] - a * pos[i][0];
				int count = 3;
				for (int k = 0; k < n; k++) {
					if (pos[k][0] * a + b == pos[k][1]) {
						count++;
						continue;
					}
					double otherA = -1 / a;
					double otherB = pos[k][1] - otherA * pos[k][0];
					for (int l = k + 1; l < n; l++) {// 检查是否有其他点在线上面
						if (otherA * pos[l][0] + otherB == pos[l][1]) {
							count++;
						}
					}
					max = Math.max(max, count);
				}
			}
		}
		System.out.println(max);
	}
}
